import request from '@/utils/request'

// 查询目录与业务关系列表
export function listDirectoryRelatedBusiness(query) {
  return request({
    url: '/directoryRelatedBusiness/directoryRelatedBusiness/list',
    method: 'get',
    params: query
  })
}

// 查询目录与业务关系详细
export function getDirectoryRelatedBusiness(id) {
  return request({
    url: '/directoryRelatedBusiness/directoryRelatedBusiness/' + id,
    method: 'get'
  })
}

// 保存目录与业务关系
export function saveDirectoryRelatedBusiness(data) {
  return request({
    url: '/directoryRelatedBusiness/directoryRelatedBusiness/save',
    method: 'post',
    data: data
  })
}

// 删除目录与业务关系
export function delDirectoryRelatedBusiness(id) {
  return request({
    url: '/directoryRelatedBusiness/directoryRelatedBusiness/' + id,
    method: 'delete'
  })
}

export function checkCode(code) {
  return request({
    url: '/directoryRelatedBusiness/directoryRelatedBusiness/checkCode/' + code,
    method: 'get'
  })
}

export function getArrayByCode(code) {
  return request({
    url: '/directoryRelatedBusiness/directoryRelatedBusiness/getArrayByCode/' + code,
    method: 'get'
  })
}

